import dayjs from "dayjs"

export const formatedate=(date:Date)=>{
 const year=date.getFullYear()
 const month= date.getMonth() +1
 const day = date.getDate()
 return [year,month<10?'0'+month:month,day<10?'0'+day:day].join('-')
}


export const newDayjs=(date:string)=>{
   return dayjs(date).fromNow()
}